package com.yunchi.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Author: Crazer
 * @Date: 2023/7/5 9:43
 * @version: 1.0.0
 * @Description:
 */
@Component
public class MonitorPropertiesUtils implements InitializingBean {
    @Value("${monitor.ip}")
    private String ip;
    @Value("${monitor.url}")
    private String url;
    @Value("${monitor.xmlData}")
    private String xmlData;
    @Value("${monitor.task.cron}")
    private String corn;
    @Value("${monitor.task.cronCDisk}")
    private String cronCDisk;
    @Value("${monitor.sms.url}")
    private String sms_url;
    @Value("${monitor.sms.phone}")
    private String sms_phone;

    public static String IP;
    public static String URL;
    public static String XMLDATA;
    public static String CRON;
    public static String CRONCDISK;
    public static String SMS_URL;
    public static String SMS_PHONE;

    @Override
    public void afterPropertiesSet() {
        IP = ip;
        URL = url;
        XMLDATA = xmlData;
        CRON = corn;
        CRONCDISK = cronCDisk;
        SMS_URL = sms_url;
        SMS_PHONE = sms_phone;
    }
}
